﻿<%@ WebHandler Language="C#" Class="CalTypeAdd" %>

using System;
using System.Web;
using BLL;
public class CalTypeAdd : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        string name, fist, last, about;

        name = context.Request.Params["name"].ToString().Trim();
        fist = context.Request.Params["fisrt"].ToString().Trim();
        last = context.Request.Params["last"].ToString().Trim();
        about = context.Request.Params["about"].ToString().Trim();
        if (name == "")
        {
            context.Response.Write("请输入姓名");
            return;
        }
        if (last == "")
        {
            context.Response.Write("请录入首磅费率");
            return;
        }
        if (last == "")
        {
            context.Response.Write("请录入次磅费率");
            return;
        }
        string value = new WayBillService().SetCalType(name, fist, last, about);
        context.Response.Write(value);


    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}